home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -readerstuff- / vedran_viskovic / setfontcolor / setrgb.readme < prev    next >
Text File  |  1999-06-22  |  3KB  |  85 lines

  1. Short:    Set front screen colours by hex or name
  2. Uploader: bq933@torfree.net (Chris Johnson)
  3. Author:   Chris F.A. Johnson
  4. Type:     cli/util
  5. Requires: Should work on any Amiga
  6.  
  7. setrgb - Set colours of front screen
  8.  
  9. USAGE: setrgb [options] nnrrggbb | nn-colour
  10.  
  11.        nn = 2-digit hexadecimal number of colour register (00 - FF)
  12.  
  13.        rr gg bb = 2-digit hexadecimal numbers for red green and blue
  14.  
  15.        -colour = name of colour from a file (default: s:rgb.txt)
  16.                  NOTE: There must be no space between the colour register,
  17.                        the hyphen, and the name of the colour.
  18.  
  19.        You may specify as many colour registers as you like on the command
  20.        line, and the different types may be mixed. The order is not
  21.        important.
  22.  
  23. OPTIONS:
  24.          --version - print version number and exit.
  25.  
  26.          --help, -h, -?  print this information and exit
  27.  
  28.          -f filename - use filename for colour data instead of s:rgb.txt
  29.  
  30.          -v[v] verbose [more verbose]
  31.               (The information printed with the verbose mode is rather
  32.               cryptic. I put it in to help debug the program. I might make
  33.               it more useful to the user at some future date.)
  34.  
  35.          setrgb version 1.0, Chris Johnson, 1999
  36.  
  37. EXAMPLES:
  38.  
  39.     setrgb 00FFFFFF 01000000 ; sets background to white and text to black
  40.  
  41.     setrgb 00-white 01-black ; same thing
  42.  
  43.  
  44.     SetRGB reads the colour information from the command line, specifying
  45.     either the RGB values, or a name which it reads from a file. The
  46.     default filename is s:rgb.txt, but a different file can be specified
  47.     with the -f option.
  48.  
  49.     Colours are named in rgb.txt using the format:
  50.  
  51.          rrr ggg bbb colourname
  52.  
  53.     where rrr, rgg, and bbb are positive integers less than 256. I have
  54.     included a sample file, but there is a much larger file containing a
  55.     few hundred colour specs. floating around (I think it may be in the
  56.     Ghostscript package, among other places).
  57.  
  58.     e.g.:
  59.  
  60.             0 0 0 black
  61.             255 255 255 white
  62.  
  63.     I have successfully tested SetRGB on an A3000 with OS3.1 and an A2000
  64.     with 2.04. (I can't find a kickstart disk to try it on my A1000.)
  65.     SetRGB tries to open a graphics.library version 39 or greater. If it is
  66.     successful, the program uses SetRGB32(); if it fails, it will open
  67.     whatever version is available and use SetRGB4().
  68.  
  69.     SetRGB will not try to set a colour register greater than the screen
  70.     can handle.
  71.  
  72.  
  73. USES:
  74.  
  75.     I use SetRGB in scripts, to start a program which does not allow me to
  76.     change the palette, and uses colours I don't like:
  77.  
  78.          .key args/F
  79.          run some-program {args}
  80.          SetRGB 00-black 01-white 02ffff00 03-turquoise
  81.  
  82.     I use it in .edrc files with the text editor, dme, which will source
  83.     any .edrc file in the current directory when it is invoked; this allows
  84.     me to colour code the editor, depending on where it was started.
  85.